#include <iostream>
using namespace std;
class Date
{
	int m_year;
	int m_month;
	int m_day;
	void checkDate();
public:
	Date();
	Date(int year,int month,int day);
	// ~Date();
	void display() const;
	
};
Date::Date(){
	m_year = 2014;
	m_month = 1;
	m_day = 1;
}
Date::Date(int year,int month,int day){
	m_year = year;
	m_month = month;
	m_day = day;
	if(!checkDate()){
		cout<<"ERROR"<<endl;
	}
}
void Date::display(){
	cout<<"Day Toady is :"<<m_year<<'-'<<m_month<<'-'<<m_day<<'-'<<endl;
}
void Date::checkDate(){
	if(year%400==0||year%100!=0&&year%4==0){ //闰年 366
		switch(m_month){
			case 1: m_day>31?break:exit(0);
			case 2: m_day>29?break:exit(0);
			case 3: m_day>31?break:exit(0);
			case 4: m_day>30?break:exit(0);
			case 5: m_day>31?break:exit(0);
			case 6: m_day>30?break:exit(0);
			case 7: m_day>31?break:exit(0);
			case 8: m_day>31?break:exit(0);
			case 9: m_day>30?break:exit(0);
			case 10: m_day>31?break:exit(0);
			case 11: m_day>30?break:exit(0);
			case 12: m_day>31?break:exit(0);
		}

	}else{ 									//平年 365
		switch(m_month){
			case 1: m_day>31?break:exit(0);
			case 2: m_day>29?break:exit(0);
			case 3: m_day>31?break:exit(0);
			case 4: m_day>30?break:exit(0);
			case 5: m_day>31?break:exit(0);
			case 6: m_day>30?break:exit(0);
			case 7: m_day>31?break:exit(0);
			case 8: m_day>31?break:exit(0);
			case 9: m_day>30?break:exit(0);
			case 10: m_day>31?break:exit(0);
			case 11: m_day>30?break:exit(0);
			case 12: m_day>31?break:exit(0);
		}
	}


}